package StudyCode.summary.myfile;

import java.io.File;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class GetJVMExecutableFile {
	public static void main(String[] argv) throws Exception {
		boolean w = true;
		System.out.println(getJVMExecutableFile(w));
	}

	private static File getJVMExecutableFile(boolean w) {
		String javaHome = System.getProperty("java.home");
		File f = new File(javaHome);
		f = new File(f, "bin");
		f = new File(f, w ? "javaw.exe" : "java.exe");
		return f;
	}
}
